<template>
  <el-card>
    <div class="box">
      <img :src="userStore.avatar" alt="" class="avatar">
      <div class="bottom">
        <h3 class="title">{{ getTime() }}{{ userStore.username }}</h3>
        <p class="subtitle">秀秀后台管理系统</p>
      </div>
    </div>
  </el-card>
  <div class="bottoms">
    <svg-icon name="welcome" width="600px" height="525px"></svg-icon>
  </div>
</template>

<script setup lang="ts">
// 引入用户相关的仓库
import useUserStore from '@/store/modules/user'
// 获取当前时间，打招呼信息的方法
import { getTime } from '@/utils/time'
// 获取存储用户信息的仓库对象
const userStore = useUserStore()
</script>

<style scoped lang="scss">
.box {
  display: flex;
  padding: 15px;
  padding-left: 30px;

  .avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-right: 20px;
  }

  .bottom {
    .title {
      font-size: 26px;
      font-weight: bold;
      margin-top: 15px;
    }

    .subtitle {
      font-size: 14px;
      color: #999;
      margin-top: 25px;
    }
  }
}

.bottoms {
  display: flex;
  justify-content: center;
  align-items: center;
}

</style>